package com.zzl.finance.order.constant;

/**
 * @author : spp
 * @date : 2022/1/6 20:51
 */
public enum OrderTypeEnum {
    /**
     * 融资服务
     */
    LATEST(1, "融资服务"),

    /**
     * 购买产品
     */
    HISTORY(2, "购买产品");

    private Integer code;
    private String value;


    OrderTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (OrderTypeEnum statusEnum : OrderTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
